Skip to content

feat(release): add OIDC trusted-publishing support to vscode-publish-release-vsix.yml - W-24756661 - #203

Closed
madhur310 wants to merge 3 commits into
mainfrom
ms/W-24756661-vsce-trusted-publishing
Closed

madhur310 wants to merge 3 commits into
mainfrom
ms/W-24756661-vsce-trusted-publishing

Conversation

@madhur310

@madhur310 madhur310 commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds vsix-name-pattern/exclude-web-vsix inputs to vscode-publish-release-vsix.yml (mirrors openvsx-publish-release-vsix.yml, behavior-preserving defaults) and swaps vsce publish -p $VSCE_PERSONAL_ACCESS_TOKEN for vsce publish --oidc -- trusted publishing instead of a PAT. Removes the VSCE_PERSONAL_ACCESS_TOKEN secret input entirely.

Why

Motivated by Microsoft's global Azure DevOps PAT retirement on 2026-12-01, which the existing VSCE_PERSONAL_ACCESS_TOKEN depends on, and by vsce 4.1.0's new --oidc flag for the Marketplace's Trusted Publishing (shipped 2026-10-28, announcement).

Why a straight swap is safe here

This file has exactly one real caller: publishVSCode.yml in salesforcedx-vscode, pinned to @main. It won't see anything on this branch until this PR merges. Validation happens via a dedicated, workflow_dispatch-only test workflow in each calling repo (salesforcedx-vscode#8565, apex-language-support#797), pinned to this branch -- same pattern used for the Open VSX migration (#199): test via a branch-pinned swap, only merge to main once validated end-to-end.

It's still unknown whether the Marketplace's trust check matches the OIDC token's workflow_ref claim (top-level initiating workflow) or job_workflow_ref (this reusable workflow itself, hosted in this repo) when the publish step runs nested cross-repo -- that's exactly what the two test PRs above are for.

Test plan

  • actionlint: zero new findings vs. main
  • Dispatch each calling repo's test workflow (pinned to this branch) against an already-published, --skip-duplicate-safe tag; confirm the Marketplace OIDC token exchange succeeds once a Trusted Publishing policy is registered for that repo/workflow

@W-24756661@

…release-vsix.yml - W-24756661

Adds an opt-in `oidc` input (default false, PAT path unchanged) so callers can publish via
`vsce publish --oidc` instead of a VSCE_PERSONAL_ACCESS_TOKEN. Kept as a toggle rather than a
straight swap (unlike the Open VSX migration) because this is genuinely untested: Microsoft only
shipped Marketplace Trusted Publishing on 2026-10-28, and it's unknown yet whether the Marketplace
matches the OIDC token's workflow_ref or job_workflow_ref claim when the publish step runs nested
inside this cross-repo reusable workflow.
…sh-release-vsix.yml - W-24756661

Mirrors openvsx-publish-release-vsix.yml's filtering inputs (behavior-preserving defaults).
Needed so apex-language-support's OIDC test workflow can exclude its web VSIX variant, same as
its Open VSX equivalent already does.
…ase-vsix.yml - W-24756661

The toggle was unnecessary: publishVSCode.yml (the real caller) is pinned to @main, so it was
already fully isolated from whatever this branch does -- the @Branch pin on the test workflow
gave the same safety a toggle would, for free. Matches the Open VSX migration's pattern: test via
a branch-pinned straight swap, only merge to main once validated.
@madhur310

Copy link
Copy Markdown
Contributor Author

Superseded by #207. A job-level reusable workflow can't support Marketplace OIDC trusted publishing regardless of what changes inside it -- the Marketplace's OIDC trust check keys off job_workflow_ref, which for a nested reusable workflow always points at salesforcecli/github-workflows rather than the calling repo, so the token exchange 401s no matter what. Confirmed via a live test in forcedotcom/salesforcedx-vscode. #207 adds an OIDC-safe composite action instead, which runs inline in the caller's own job so job_workflow_ref matches.

@madhur310 madhur310 closed this Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant